var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function r() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, 
    new r());
}), a = this && this.__decorate || function(e, t, o, r) {
    var i, n = arguments.length, a = n < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, o) : r;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, o, r); else for (var c = e.length - 1; 0 <= c; c--) (i = e[c]) && (a = (n < 3 ? i(a) : 3 < n ? i(t, o, a) : i(t, o)) || a);
    return 3 < n && a && Object.defineProperty(t, o, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("HeadView"), s = cc._decorator, c = s.ccclass, l = s.property, d = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.skeleton = null, e.leftHead = null, e.rightHead = null, e.defaultPic = null, 
        e;
    }
    return i(e, t), e.prototype.start = function() {}, e.prototype.init = function(e, t) {
        var o = this;
        this.rightHead && this.rightHead.init(e.model.icon, e.model.nickname, e.model.personIdx).catch(function() {
            o.rightHead && o.rightHead.sprite && o.defaultPic && (o.rightHead.sprite.spriteFrame = o.defaultPic);
        }), this.leftHead && this.leftHead.init(t.model.icon, t.model.nickname, t.model.personIdx).catch(function() {
            o.leftHead && o.leftHead.sprite && o.defaultPic && (o.leftHead.sprite.spriteFrame = o.defaultPic);
        });
    }, a([ l(sp.Skeleton) ], e.prototype, "skeleton", void 0), a([ l(r.default) ], e.prototype, "leftHead", void 0), 
    a([ l(r.default) ], e.prototype, "rightHead", void 0), a([ l(cc.SpriteFrame) ], e.prototype, "defaultPic", void 0), 
    a([ c ], e);
}(cc.Component);

n.default = d;